package com.moli.iov.protocol.model.realtime;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

import com.moli.iov.protocol.codec.Serialize;
import com.moli.iov.protocol.model.EntityBytesLen;

@Serialize(unit="byte",isBigEndian=true)
public class ExtendCanInfo implements Serializable,EntityBytesLen{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8116185218320180434L;


	@Serialize(unit="byte",offset=0,size=2)
	public int extendLength;
	
	
	public int getExtendLength() {
		return extendLength;
	}

	public void setExtendLength(int extendLength) {
		this.extendLength = extendLength;
	}

	@Override
	public int getBytesLen() {
		return extendLength+3;
	}
	
	@Serialize(unit="byte",offset=2,size=1)
	public int canPackageCount;
	
	@Serialize(unit="byte",offset=3,size=-1)
	public byte[] canData;

	public int getCanPackageCount() {
		return canPackageCount;
	}

	public void setCanPackageCount(int canPackageCount) {
		this.canPackageCount = canPackageCount;
	}

	

	public byte[] getCanData() {
		return canData;
	}

	public void setCanData(byte[] canData) {
		this.canData = canData;
	}

	@Override
	public String toString() {
		return "ExtendCanInfo [extendLength=" + extendLength
				+ ", canPackageCount=" + canPackageCount + ", canData="
				+ Arrays.toString(canData) + "]\r\n";
	}

		
	
	
}
